// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
    devtools: {enabled: true},
    imports: {
        dirs: ['apis', 'utils']
    },
    app: {
        head: {
            title: "船员云",
            //titleTemplate:"%s-航运公司数字化安全管理体系平台",
            titleTemplate:"%s",
            charset: "utf-8",
            htmlAttrs: {
                lang: "zh-cn",
            },
            link: [
                {rel: 'stylesheet', href: '/fonts/iconfont.css'},
                {rel: 'stylesheet', href: '/css/animate.css'}
            ]
        },

        pageTransition: {
            name: 'slide-fade',
            mode: 'out-in' // 默认值
        }
    },
    modules: [
        '@ant-design-vue/nuxt',
        ['@pinia/nuxt', {
            autoImports: ['defineStore']
        }],
        '@pinia-plugin-persistedstate/nuxt',
    ],
    css: [
        '@/assets/css/main.css'
    ],
    vite: {
        esbuild: {
            drop: process.env.NODE_ENV === 'production' ? ['console', 'debugger'] : []
        },
        build: {
            minify: 'esbuild',
            chunkSizeWarningLimit: 1024,
            cssCodeSplit: true
        },
    },
    nitro: {
        // 缩小捆绑包
        minify: true,
        // 关闭源映射生成
        sourceMap: false,
    },
    antd: {
        // Options
    }
})
